import { createRouter,createWebHashHistory } from "vue-router";
// import Home from '@/components/HelloWorld.vue'
import {navData} from '@/untils/nav'

const routes=[
    {
        path:'/',
        name:'Home',
        component:()=>import ("@/components/HelloWorld.vue")
    }
]

navData.forEach((item)=>{
    routes.push({
        path:item.path,
        name:item.name,
        component:()=>import ("@/"+item.component)
    })
})

const router=createRouter({
    history:createWebHashHistory(),
    routes
})

export default router;